package com.ofhb.webapp.client.ui.grid.events;

import com.google.gwt.event.shared.GwtEvent;

public class RowSelectEvent extends GwtEvent<RowSelectEventHandler> {

	private int selectedRow;

	public static Type<RowSelectEventHandler> TYPE = new Type<RowSelectEventHandler>();

	public RowSelectEvent(int selectedRow) {
		this.selectedRow = selectedRow;
	}
	
	@Override
	public Type<RowSelectEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(RowSelectEventHandler handler) {
		handler.onRowSelectEvent(this);
	}

	public int getSelectedRow() {
		return selectedRow;
	}

	public void setSelectedRow(int selectedRow) {
		this.selectedRow = selectedRow;
	}

}
